import { createRouter, createWebHistory } from 'vue-router';
import Home from '../views/Home.vue';
import ScenicSpot from '../views/ScenicSpot.vue';
import Login from '../views/Login.vue';
import Spots from '../views/Spots.vue';

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/spot/:id',
    name: 'ScenicSpot',
    component: ScenicSpot,
    props: true
  },
  {
    path: '/login',
    name: 'Login',
    component: Login
  },
  {
    path: '/spots',
    name: 'Spots',
    component: Spots
  },
  // Add routes for register, etc. later
  {
  path: '/register',
  name: 'Register',
  component: () => import('@/views/Register.vue')
}
];

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
});

export default router; 